<%--
  Created by IntelliJ IDEA.
  User: WeaponLin
  Date: 2015/11/23
  Time: 14:26
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<html>
<link rel="stylesheet" type="text/css" href="<%=path%>/css/table.css"/>
<link rel="stylesheet" type="text/css" href="<%=path%>/css/app.css"/>

<div id="menubar">
    <img src="<%=path%>/images/left.png" style="margin-top:auto;margin-bottom:auto;width:15px; height:15px">图书归还
</div>

<s:if test="#session.loginState == 1 && #session.isAdmin == true">
    <table class="default" width="70%" style="margin-top:20px;margin-left: 20px">
        <col width="10%">
        <col width="10%">
        <col width="10%">
        <col width="10%">
        <col width="10%">
        <col width="10%">
        <col width="5%">
        <col width="5%">
        <tr class="title">
            <td style="text-align:center">读者编号</td>
            <td style="text-align:center">读者姓名</td>
            <td style="text-align:center">图书编号</td>
            <td style="text-align:center">书名</td>
            <td style="text-align:center">借书时间</td>
            <td style="text-align:center">应还时间</td>
            <td style="text-align:center">是否丢失</td>
            <td style="text-align:center">操作</td>
        </tr>
        <s:if test="#session.bookReturn_list != null">
            <!-- 遍历开始 -->
            <s:iterator value="#session.bookReturn_list" var="borrow">
                <tr class="list">
                    <td style="text-align:center"><s:property value="#borrow.reader.readerid"/></td>
                    <td style="text-align:center"><s:property value="#borrow.reader.readername"/></td>
                    <td style="text-align:center"><s:property value="#borrow.book.bookid"/></td>
                    <td style="text-align:center"><s:property value="#borrow.book.bookname"/></td>
                    <td style="text-align:center"><s:date name="#borrow.dateborrow" format="yyyy-MM-dd"/></td>
                    <td style="text-align:center"><s:date name="#borrow.datereturn" format="yyyy-MM-dd"/></td>
                    <td style="text-align:center"><s:property value="#borrow.loss"/></td>
                    <td style="text-align:center" colspan="1">
                        <a href="<%=path%>/admin/AdminAction_bookReturn.action?readerid=<s:property value="#borrow.reader.readerid"/>&bookid=<s:property value="#borrow.book.bookid"/>">归还</a>
                    </td>
                </tr>
            </s:iterator>
        </s:if>
        <s:else>
            <table width="70%" style="margin-top:20px;margin-left: 20px">
                <tr>
                    <td>
                        <h2 style="text-align: center">系统当前无借阅信息！</h2>
                    </td>
                </tr>
            </table>
        </s:else>
    </table>
</s:if>

<s:else>
    <table width="100%" style="margin-top:50px;">
        <tr>
            <td>
                <h2 style="text-align: center">请使用管理员账号登录！</h2>
            </td>
        </tr>
    </table>
</s:else>

</html>



